CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
PROJECT(liboz)

SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" )

SET( CMAKE_CONFIGURATION_TYPES "Release;Debug" CACHE STRING "limited configs" FORCE )
IF( NOT CMAKE_BUILD_TYPE )
    SET( CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE)
ENDIF()

SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

INCLUDE(3rdparty)
INCLUDE(Utils)
INCLUDE(SetupCPack)
INCLUDE(SetupCUDA)

FIND_PACKAGE(Qt4)
INCLUDE(${QT_USE_FILE})

FIND_PACKAGE(OpenCV QUIET)
FIND_PACKAGE(TIFF QUIET)
FIND_PACKAGE(Libav QUIET)
#FIND_PACKAGE(OpenGL)
#FIND_PACKAGE(GLEW)
FIND_PACKAGE(Cairo QUIET)
#FIND_PACKAGE(Matlab QUIET)

ADD_SUBDIRECTORY(oz)
ADD_SUBDIRECTORY(util)
ADD_SUBDIRECTORY(main)
ADD_SUBDIRECTORY(test)
OPTION(PYTHON_OZ_MODULE "Build python extension module" OFF)
IF(PYTHON_OZ_MODULE)
    ADD_SUBDIRECTORY(pyoz)
ENDIF()
